/**
*@Author: QWP
*@Description: 登录相关接口
*@Date 2024-08-07 20:49
*/
import request from '@/http'

// 登录
export const login = async (data: object) => {
  return await request.post({
    url: '/oauth/noToken/login',
    data: data
  })
}

// 退出登录
export const logout = async (data: object) => {
  return await request.post({
    url: '/oauth/noToken/logout',
    data: data
  })
}

// 用户解锁
export const t = async (data: object) => {
  return await request.post({
    url: '/authority/online/t',
    data: data
  })
}

// 验证码
export const captcha = async (key: string | number) => {
  return await request.download({
    url: '/api/oauth/anno/captcha?key='+key,
    // headersType: 'application/x-www-form-urlencoded'
  })
}

// 验证码
export const check = async (data: any) => {
  return await request.get({
    url: '/api/oauth/anno/check',
    params: data,
    headersType: 'application/x-www-form-urlencoded'
  })
}